import { LangEnGhs } from "@/utils/langEnGhs"
import { LangEnKes } from "@/utils/langEnKes";
import { LangEnUgx } from "@/utils/langEnUgx";
import { LangFrFcfa } from "@/utils/langFrFcfa";
import { LangFrXaf } from "@/utils/langFrXaf";

//类型：监听用户时区
export const GET_ZONE_AREA_REQ_SUCCESS = "GET_ZONE_AREA_REQ_SUCCESS"


/**
 * 设置用户时区
 * @returns thunk
 */
export const setZoneArea = (zonePath) => {
    let data = {}
    if (zonePath.endsWith('gha') || zonePath.endsWith('ghs')) {
        data = LangEnGhs;

    } else if (zonePath.endsWith('ksh') || zonePath.endsWith('kes')) {
        data = LangEnKes;

    } else if (zonePath.endsWith('ugx')) {
        data = LangEnUgx;

    } else if (zonePath.endsWith('xaf')) {
        data = LangFrXaf;

    } else if (zonePath.endsWith('fcfa')) {
        data = LangFrFcfa;

    } else {
        data = LangEnGhs;
    }

    return {
        type: GET_ZONE_AREA_REQ_SUCCESS,
        payload: data
    }
}

